package org.kwisatz.proxybot;

public interface Filter
{
	/**
	 * Filter a line comming from the IRC server
	 * @param line the raw line to filter
	 * @param message the parsed message
	 * @return the filtered line. If null the line will not be transmetted to the client.
	 */
	String handleServerLine(String line, Message message);
	
	/**
	 * Filter a line comming from the IRC client
	 * @param line the raw line to filter
	 * @param message the parsed message
	 * @return the filtered line. If null the line will not be transmetted to the server.
	 */	
	String handleClientLine(String line, Message message);

	/**
	 * Called by proxybot to provide the context to this filter
	 * @param context
	 */
	void setContext(Context context);

	/**
	 * Return a default ID or null. If null the ID must be specified when adding
	 * this filter.
	 */
	String getID();
}